<?xml version="1.0" encoding="UTF-8"?>
<definitions 
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">

  <process id="testIntermediateThrowEvent" isExecutable="true">

    <startEvent id="theStart" />

    <sequenceFlow id="flow1"  sourceRef="theStart" targetRef="intermediateThrowEvent" />

    <intermediateThrowEvent id="intermediateThrowEvent" camunda:asyncAfter="true">

      <extensionElements>

          <camunda:executionListener
              event="start"
              expression="${execution.setVariable('listenerStartInvoked', true)}" />

          <camunda:executionListener
              event="end"
              expression="${execution.setVariable('listenerEndInvoked', true)}" />

        </extensionElements>

      <messageEventDefinition camunda:class="org.camunda.bpm.engine.test.bpmn.event.message.DummyServiceTask" />

    </intermediateThrowEvent>

    <sequenceFlow id="flow2" sourceRef="intermediateThrowEvent" targetRef="theEnd" />

    <endEvent id="theEnd" />

  </process>

</definitions>
